﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using JCore.LoLProfiler_Test.Classes;
using Magic;

namespace JCore.LoLProfiler_Test
{
    public partial class frmInGameInfo : Form
    {
        private LoLMemoryReader MemReader;

        public frmInGameInfo()
        {
            InitializeComponent();
            MemReader = new LoLMemoryReader();
            MemReader.InitializeMemoryReader();
            Application.DoEvents();
            tmrUpdateStats.Enabled = true;
        }

        private void tmrUpdateStats_Tick(object sender, EventArgs e)
        {
            int MaxHP = MemReader.getMaxHp;
            int MaxMana = MemReader.getMaxMana;
            int Mana = MemReader.getCurrentMana;
            int HP = MemReader.getCurrentHp;

            prgHealth.Value = (HP/MaxHP)*100;
            prgMana.Value = (Mana/MaxMana)*100;

            lblHealth.Text = HP + " / " + MaxHP;


        }
    }
}
